/********************************************************************
	created:	2012/02/04
	filename: 	Ray.h
	author:		Mwolf
	
	purpose:	
*********************************************************************/
#ifndef Ray_h__
#define Ray_h__

#include "Math/GWVectors.h"

struct Ray
{
	Vector3		origin;
	Vector3		dir;		// normalized direction
	float		dist;
};

Ray		Ray_ByDefinition(const Vector3& begin, const Vector3& end);
float	Ray_IntersectTriangle(const Ray& ray, const Vector3& v1, const Vector3& v2, const Vector3& v3, bool cull = true, Vector3* vHit = 0);
float Ray_IntersectBox(const Ray& ray, const Vector3& vMin, const Vector3& vMax, Vector3* vHit = 0, int* faceId = 0);

#endif // Ray_h__